﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using TrainingWorkshop.Model;

namespace TrainingWorkshop.DAL
{
    public class SqlFactory : IFactory<SqlConnection> 
    {
        public SqlConnection ConnectObject;

        public SqlFactory(String TConnectionString)
        {
            ConnectObject = new SqlConnection(TConnectionString);
        }

        public SqlConnection GetConnectObject()
        { 
            return ConnectObject; 
        }

        public TeacherRepository GetTeacherRepositoryObject()
        {
            TeacherRepository a = new TeacherRepository();
            return a;
        }

        public DepartmentRepository GetDepartmentRepositoryObject()
        {
            DepartmentRepository a =new DepartmentRepository();
            return a;
 
        }
    }
}
